<template>
  <el-dialog
    :title="title"
    :visible.sync="show" append-to-body
    :width="width" :close-on-click-modal="false"
    :before-close="handleClose">
    <slot></slot>
    <span slot="footer" class="dialog-footer">
    <el-button size="mini" @click="handleClose">取 消</el-button>
    <slot name="ok"></slot>
  </span>
  </el-dialog>
</template>

<script>
export default {
  props: {
    show: false,
    width: {
      default: '500px'
    },
    title: {
      default: ''
    }
  },
  data() {
    return {}
  },
  computed: {},
  watch: {},
  methods: {
    handleClose() {
      this.$emit('update:show', false)
    }
  }
}
</script>

<style scoped>

</style>
